import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
Customers=pd.read_csv("/content/drive/MyDrive/Datasets/CustomerSegmentationOlist/olist_customers_dataset.csv")
print("Customers:",Customers.shape)
Geolocation=pd.read_csv("/content/drive/MyDrive/Datasets/CustomerSegmentationOlist/olist_geolocation_dataset.csv")
print("Geolocation:",Geolocation.shape)
OrderItems=pd.read_csv("/content/drive/MyDrive/Datasets/CustomerSegmentationOlist/olist_order_items_dataset.csv")
print("OrderItems:",OrderItems.shape)
OrderPayment=pd.read_csv("/content/drive/MyDrive/Datasets/CustomerSegmentationOlist/olist_order_payments_dataset.csv")
print("OrderPayment:",OrderPayment.shape)
OrderReviews=pd.read_csv("/content/drive/MyDrive/Datasets/CustomerSegmentationOlist/olist_order_reviews_dataset.csv")
print("OrderReviews:",OrderReviews.shape)
Orders=pd.read_csv("/content/drive/MyDrive/Datasets/CustomerSegmentationOlist/olist_orders_dataset.csv")
print("Orders:",Orders.shape)
Products=pd.read_csv("/content/drive/MyDrive/Datasets/CustomerSegmentationOlist/olist_products_dataset.csv")
print("Products:",Products.shape)
Sellers=pd.read_csv("/content/drive/MyDrive/Datasets/CustomerSegmentationOlist/olist_sellers_dataset.csv")
print("Sellers:",Sellers.shape)
CategoryName=pd.read_csv("/content/drive/MyDrive/Datasets/CustomerSegmentationOlist/product_category_name_translation.csv")
print("CategoryName:",CategoryName.shape)
Customers: (99441, 5) Geolocation: (1000163, 5) OrderItems: (112650, 7) OrderPayment: (103886, 5) OrderReviews: (99224, 7) Orders: (99441, 8) Products: (32951, 9) Sellers: (3095, 4) CategoryName: (71, 2)
Customers.head(3)
customer_id | customer_unique_id | customer_zip_code_prefix | customer_city | customer_state | |
---|---|---|---|---|---|
0 | 06b8999e2fba1a1fbc88172c00ba8bc7 | 861eff4711a542e4b93843c6dd7febb0 | 14409 | franca | SP |
1 | 18955e83d337fd6b2def6b18a428ac77 | 290c77bc529b7ac935b93aa66c333dc3 | 9790 | sao bernardo do campo | SP |
2 | 4e7b3e00288586ebd08712fdd0374a03 | 060e732b5b29e8181a18229c7b0b2b5e | 1151 | sao paulo | SP |
Geolocation.head(3)
geolocation_zip_code_prefix | geolocation_lat | geolocation_lng | geolocation_city | geolocation_state | |
---|---|---|---|---|---|
0 | 1037 | -23.545621 | -46.639292 | sao paulo | SP |
1 | 1046 | -23.546081 | -46.644820 | sao paulo | SP |
2 | 1046 | -23.546129 | -46.642951 | sao paulo | SP |
OrderItems.head(3)
order_id | order_item_id | product_id | seller_id | shipping_limit_date | price | freight_value | |
---|---|---|---|---|---|---|---|
0 | 00010242fe8c5a6d1ba2dd792cb16214 | 1 | 4244733e06e7ecb4970a6e2683c13e61 | 48436dade18ac8b2bce089ec2a041202 | 2017-09-19 09:45:35 | 58.9 | 13.29 |
1 | 00018f77f2f0320c557190d7a144bdd3 | 1 | e5f2d52b802189ee658865ca93d83a8f | dd7ddc04e1b6c2c614352b383efe2d36 | 2017-05-03 11:05:13 | 239.9 | 19.93 |
2 | 000229ec398224ef6ca0657da4fc703e | 1 | c777355d18b72b67abbeef9df44fd0fd | 5b51032eddd242adc84c38acab88f23d | 2018-01-18 14:48:30 | 199.0 | 17.87 |
OrderPayment.head(3)
order_id | payment_sequential | payment_type | payment_installments | payment_value | |
---|---|---|---|---|---|
0 | b81ef226f3fe1789b1e8b2acac839d17 | 1 | credit_card | 8 | 99.33 |
1 | a9810da82917af2d9aefd1278f1dcfa0 | 1 | credit_card | 1 | 24.39 |
2 | 25e8ea4e93396b6fa0d3dd708e76c1bd | 1 | credit_card | 1 | 65.71 |
OrderReviews.head(3)
review_id | order_id | review_score | review_comment_title | review_comment_message | review_creation_date | review_answer_timestamp | |
---|---|---|---|---|---|---|---|
0 | 7bc2406110b926393aa56f80a40eba40 | 73fc7af87114b39712e6da79b0a377eb | 4 | NaN | NaN | 2018-01-18 00:00:00 | 2018-01-18 21:46:59 |
1 | 80e641a11e56f04c1ad469d5645fdfde | a548910a1c6147796b98fdf73dbeba33 | 5 | NaN | NaN | 2018-03-10 00:00:00 | 2018-03-11 03:05:13 |
2 | 228ce5500dc1d8e020d8d1322874b6f0 | f9e4b658b201a9f2ecdecbb34bed034b | 5 | NaN | NaN | 2018-02-17 00:00:00 | 2018-02-18 14:36:24 |
Orders.head(3)
order_id | customer_id | order_status | order_purchase_timestamp | order_approved_at | order_delivered_carrier_date | order_delivered_customer_date | order_estimated_delivery_date | |
---|---|---|---|---|---|---|---|---|
0 | e481f51cbdc54678b7cc49136f2d6af7 | 9ef432eb6251297304e76186b10a928d | delivered | 2017-10-02 10:56:33 | 2017-10-02 11:07:15 | 2017-10-04 19:55:00 | 2017-10-10 21:25:13 | 2017-10-18 00:00:00 |
1 | 53cdb2fc8bc7dce0b6741e2150273451 | b0830fb4747a6c6d20dea0b8c802d7ef | delivered | 2018-07-24 20:41:37 | 2018-07-26 03:24:27 | 2018-07-26 14:31:00 | 2018-08-07 15:27:45 | 2018-08-13 00:00:00 |
2 | 47770eb9100c2d0c44946d9cf07ec65d | 41ce2a54c0b03bf3443c3d931a367089 | delivered | 2018-08-08 08:38:49 | 2018-08-08 08:55:23 | 2018-08-08 13:50:00 | 2018-08-17 18:06:29 | 2018-09-04 00:00:00 |
Products.head(3)
product_id | product_category_name | product_name_lenght | product_description_lenght | product_photos_qty | product_weight_g | product_length_cm | product_height_cm | product_width_cm | |
---|---|---|---|---|---|---|---|---|---|
0 | 1e9e8ef04dbcff4541ed26657ea517e5 | perfumaria | 40.0 | 287.0 | 1.0 | 225.0 | 16.0 | 10.0 | 14.0 |
1 | 3aa071139cb16b67ca9e5dea641aaa2f | artes | 44.0 | 276.0 | 1.0 | 1000.0 | 30.0 | 18.0 | 20.0 |
2 | 96bd76ec8810374ed1b65e291975717f | esporte_lazer | 46.0 | 250.0 | 1.0 | 154.0 | 18.0 | 9.0 | 15.0 |
Sellers.head(3)
seller_id | seller_zip_code_prefix | seller_city | seller_state | |
---|---|---|---|---|
0 | 3442f8959a84dea7ee197c632cb2df15 | 13023 | campinas | SP |
1 | d1b65fc7debc3361ea86b5f14c68d2e2 | 13844 | mogi guacu | SP |
2 | ce3ad9de960102d0677a81f5d0bb7b2d | 20031 | rio de janeiro | RJ |
CategoryName.head(3)
product_category_name | product_category_name_english | |
---|---|---|
0 | beleza_saude | health_beauty |
1 | informatica_acessorios | computers_accessories |
2 | automotivo | auto |
Geolocation, sellers and categorie are not usefull